JMS Interview Questions and Answers
Ques 46. What are the different messaging paradigms JMS supports?
Publish and Subscribe i.e. pub/suc and Point to Point i.e. p2p.
Ques 47. What are the three components of a Message?
A JMS message consists of three parts:
Message header - For message identification. For example, the header is used to determine if a given message is appropriate for a "subscriber"
Properties - For application-specific, provider-specific, and optional header fields
Body - Holds the content of the message. Several formats are supported, including TextMessage, which wrap a simple String, that wrap arbitrary Java objects (which must be serializable). Other formats are supported as well.
Ques 48. What is the difference between topic and queue?
A topic is typically used for one to many messaging i.e. it supports publish subscribe model of messaging. While queue is used for one-to-one messaging i.e. it supports Point to Point Messaging.
Ques 49. What are the types of messaging?
There are two kinds of Messaging. Synchronous messaging involves a client that waits for the server to respond to a message. Asynchronous messaging involves a client that does not wait for a message from the server. An event is used to trigger a message from a server.
Ques 50. What is the use of Message object?
Message is a light weight message having only header and properties and no payload. Thus if theIf the receivers are to be notified abt an event, and no data needs to be exchanged then using Message can be very efficient.
Most helpful rated by users:
- How many messaging models do JMS provide for and what are they?
- What is JMS (Java Messaging Service)?
- How the JMS is different from RPC?
- What are the different types of messages available in the JMS API?
- What are the basic advantages of JMS?